package cn.etg.observer;

import cn.etg.observer.impl.ObjectFor3D;
import cn.etg.observer.impl.ObserverOne;
import cn.etg.observer.impl.ObserverSecond;

public class ObserverApp {
    public static void main(String[] args) {
        // 获得3D彩票主题
        ObjectFor3D objectFor3D = new ObjectFor3D();
        // 获得两个观察者(关注彩票的人)
        Observer o1 = new ObserverOne(objectFor3D);
        Observer o2 = new ObserverSecond(objectFor3D);
        // 发送3D彩票消息
        objectFor3D.setMsg("20140420的3D试机号码是：127");
        objectFor3D.setMsg("20140420的3D号码是：333");
    }
}
